<template>
  <div>
         <Topbar/>
        <h1 v-for="(v) in arr" :key="v.id" @click="fun(v.id)">{{v.title}}</h1>
  </div>
</template>

<script>
import Topbar from "@/components/topbar.vue"
export default {
    components:{
      Topbar
    },
    data(){
      return {
        arr:[
          {id:123434, title:"我是新闻标题11"},
          {id:2435124, title:"我是新闻标题12"},
          {id:3345345, title:"我是新闻标题13"},
          {id:42346568, title:"我是新闻标题14"},
          {id:557834524, title:"我是新闻标题15"},
          {id:634623475, title:"我是新闻标题16"},
          {id:7234468, title:"我是新闻标题17"}
        ]
      }
    },
    methods:{
       fun(id){
         console.log(id)
         this.$router.push({name:"Xiangqing",params:{xiaoming:id}})
       } 
    }
}
</script>

<style>

</style>